package cn.iocoder.yudao.module.measure.service.warning.impl;


import cn.iocoder.yudao.framework.tenant.core.util.TenantUtils;
import cn.iocoder.yudao.module.measure.dal.dataobject.warning.BusinessDeviceWarnRecord;
import cn.iocoder.yudao.module.measure.dal.mysql.warning.BusinessDeviceWarnRecordMapper;
import cn.iocoder.yudao.module.measure.service.warning.BusinessDeviceWarnRecordService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;


/**
 * <p>
 * 业务实现类
 * 设备报警记录表
 * </p>
 *
 * @author zhengbzh
 * @date 2025-06-04 11:02:15
 * @create [2025-06-04 11:02:15] [zhengbzh] [代码生成器生成]
 */
@Slf4j
@RequiredArgsConstructor
@Service
@Transactional(readOnly = true)
public class BusinessDeviceWarnRecordServiceImpl implements BusinessDeviceWarnRecordService {


    @Resource
    private final BusinessDeviceWarnRecordMapper businessDeviceWarnRecordMapper;

    @Transactional
    @Override
    public void save(Long tenantId, BusinessDeviceWarnRecord businessDeviceWarnRecord) {
        TenantUtils.execute(tenantId, () -> {
            businessDeviceWarnRecordMapper.insert(businessDeviceWarnRecord);
        });
    }
}


